import request from '@/utils/request'

export default {
    //获取轮播图分页列表
    getSlideShowListPage(page, limit, slideShowQuery,status) {
        return request({
            url: `/sys/slideshow/selectAll?page=`+page+"&limit="+limit+"&name="+slideShowQuery+"&status="+status,
            method: 'get'
        })
    },
    //批量移除轮播图到回收站或者删除
    removeShowListPage(checkList,status) {
        return request({
            url: `/sys/slideshow/removeOrDelete`,
            method: 'post',
            data: {
                "checkList":checkList,
                "status":status
            }
        })
    },
    //添加轮播图
    addSlideShow(slideShow) {
        return request({
            url: `/sys/slideshow/addSlideShow`,
            method: 'post',
            data: {
                "createTime": slideShow.createTime,
                "descrption": slideShow.descrption,
                "id": slideShow.id,
                "name": slideShow.name,
                "pic": slideShow.pic,
                "status": slideShow.status
            }
        })
    },
    //根据id查询轮播图
    getSlideShow(id) {
        return request({
            url: `/sys/slideshow/selectOne?id=`+id,
            method: 'get'
        })
    },
    //修改轮播图
    updateSlideShow(slideShow) {
        return request({
            url: `/sys/slideshow/updateOne`,
            method: 'post',
            data: {
            "createTime": slideShow.createTime,
            "descrption": slideShow.descrption,
            "id": slideShow.id,
            "name": slideShow.name,
            "pic": slideShow.pic,
            "status": slideShow.status
        }
        })
    },
    //分页显示轮播图回收站列表
    recycleSlideShowPage(page, limit, slideShowQuery) {
        return request({
            url: `/slideShow/selectRecycleAll/${page}/${limit}`,
            method: 'post',
            data: slideShowQuery
        })
    },
    //从回收站恢复数据
    recoverSlideShow(checkList) {
        return request({
            url: `/slideShow/recoverSlideShow`,
            method: 'post',
            data: checkList
        })
    },

}